package com.hadwinling.alogriithm.day05.fun

object Method2Function {
  def main(args: Array[String]): Unit = {
    val dog = new Dog
    println(dog.sum(10,20))

    val f1 = dog.sum _
    println("f1=",f1)
    println("f1=",f1(50,60))




  }

}
class Dog{
  //
  def sum(n1:Int,n2 :Int): Unit ={
    n1+n2
  }
}
